# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=bmc-tools
pkgver=36.94037ce
pkgrel=1
pkgdesc='RDP Bitmap Cache parser.'
groups=('blackarch' 'blackarch-forensic' 'blackarch-sniffer')
arch=('any')
url='https://github.com/ANSSI-FR/bmc-tools'
license=('custom:unknown')
depends=('python2')
makedepends=('git')
source=("git+https://github.com/ANSSI-FR/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed 's|/usr/bin/env python|/usr/bin/env python2|g' -i "$pkgname.py"
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENCE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

